package com.wch.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.wch.entity.Emp;
import com.wch.service.EmpService;
import com.wch.util.NoteResult;

@Controller
@RequestMapping("/emp")
public class RegistController {

    @Autowired
    private EmpService service;

    @RequestMapping("/regist.do")
    @ResponseBody
    public NoteResult regist(Emp emp){
        NoteResult result =
                service.save(emp);
        return result;
    }
}
